package com.mm.cloth.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 搭配模型类，用于表示搭配信息
 */
public class Outfit implements Serializable {
    private int id;
    private String name;
    private List<ClothesPosition> clothesPositions;
    private String createdAt;
    private String updatedAt;

    public Outfit() {
        this.clothesPositions = new ArrayList<>();
    }

    public Outfit(int id, String name) {
        this.id = id;
        this.name = name;
        this.clothesPositions = new ArrayList<>();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<ClothesPosition> getClothesPositions() {
        return clothesPositions;
    }

    public void setClothesPositions(List<ClothesPosition> clothesPositions) {
        this.clothesPositions = clothesPositions;
    }

    public void addClothesPosition(ClothesPosition clothesPosition) {
        if (this.clothesPositions == null) {
            this.clothesPositions = new ArrayList<>();
        }
        this.clothesPositions.add(clothesPosition);
    }

    public String getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(String createdAt) {
        this.createdAt = createdAt;
    }

    public String getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(String updatedAt) {
        this.updatedAt = updatedAt;
    }

    /**
     * 衣物位置信息内部类
     */
    public static class ClothesPosition implements Serializable {
        private Clothes clothes;
        private float x;
        private float y;
        private float scale;

        public ClothesPosition() {
        }

        public ClothesPosition(Clothes clothes, float x, float y, float scale) {
            this.clothes = clothes;
            this.x = x;
            this.y = y;
            this.scale = scale;
        }

        public Clothes getClothes() {
            return clothes;
        }

        public void setClothes(Clothes clothes) {
            this.clothes = clothes;
        }

        public float getX() {
            return x;
        }

        public void setX(float x) {
            this.x = x;
        }

        public float getY() {
            return y;
        }

        public void setY(float y) {
            this.y = y;
        }

        public float getScale() {
            return scale;
        }

        public void setScale(float scale) {
            this.scale = scale;
        }
    }
} 